package com.sale24h.data;

import org.json.JSONException;
import org.json.JSONObject;

public class clsMatHang
{
	private String maHang;
	private String maNguoiDung;
	private String tenHang;
	private String donvi;
	private double donGia1;
	private double donGia2;
	private double donGia3;
	private String maNhom;
	private Boolean active;
	private Boolean hetmon;
	private String ngayca;
	private double phantram;
	private String combo;
	
	public String getMaHang()
	{
		return maHang;
	}
	public void setMaHang(String maHang)
	{
		this.maHang = maHang;
	}
	public String getMaNguoiDung()
	{
		return maNguoiDung;
	}
	public void setMaNguoiDung(String maNguoiDung)
	{
		this.maNguoiDung = maNguoiDung;
	}
	public String getTenHang()
	{
		return tenHang;
	}
	public void setTenHang(String tenHang)
	{
		this.tenHang = tenHang;
	}
	public String getDonVi()
	{
		return donvi;
	}
	public void setDonVi(String donvi)
	{
		this.donvi = donvi;
	}
	public double getDonGia1()
	{
		return donGia1;
	}
	public void setDonGia1(double donGia1)
	{
		this.donGia1 = donGia1;
	}
	public double getDonGia2()
	{
		return donGia2;
	}
	public void setDonGia2(double donGia2)
	{
		this.donGia2 = donGia2;
	}
	public double getDonGia3()
	{
		return donGia3;
	}
	public void setDonGia3(double donGia3)
	{
		this.donGia3 = donGia3;
	}
	public String getMaNhom()
	{
		return maNhom;
	}
	public void setMaNhom(String maNhom)
	{
		this.maNhom = maNhom;
	}
	public Boolean getActive()
	{
		return active;
	}
	public void setActive(Boolean active)
	{
		this.active = active;
	}
	public Boolean getHetmon()
	{
		return hetmon;
	}
	public void setHetmon(Boolean hetmon)
	{
		this.hetmon = hetmon;
	}
	public String getNgayca()
	{
		return ngayca;
	}
	public void setNgayca(String ngayca)
	{
		this.ngayca = ngayca;
	}
	public double getPhantram()
	{
		return phantram;
	}
	public void setPhantram(double phantram)
	{
		this.phantram = phantram;
	}
	public String getCombo()
	{
		return combo;
	}
	public void setCombo(String combo)
	{
		this.combo = combo;
	}
	public void InitFromJSON(JSONObject jmh) throws JSONException
	{
		//this.active=jmh.getInt("active")==1?true:false;
		this.combo=jmh.getString("combo");
		this.donGia1=jmh.getDouble("dongia1");
		this.donGia2=jmh.getDouble("dongia2");
		this.donGia3=jmh.getDouble("dongia3");
		//this.hetmon=jmh.getInt("hetmon")==1?true:false;
		this.donvi=jmh.getString("tendonvi");
		this.maHang=jmh.getString("mahang");
		this.maNguoiDung=jmh.getString("manguoidung");
		this.ngayca=jmh.getString("ngayca");
		this.phantram=jmh.getDouble("phantram");
		this.tenHang=jmh.getString("tenhang");		
	}
	@Override
	public String toString()
	{
		return this.tenHang;
	}
	

}
